home *** CD-ROM | disk | FTP | other *** search
- <%@ Language=VBScript %>
- <%' (c) Copyright 1999-2004 PaperCut Software Pty. Ltd. %>
- <!-- #INCLUDE FILE="includes/PCCommon.inc" -->
- <!-- #INCLUDE FILE="includes/header.inc" -->
- <%
-
- Dim objPCTopUpCards
- Set objPCTopUpCards = CreateObject("PCWebAdmin.PCTopUpCards")
- If objPCTopUpCards.Error Then
- WriteErrorMessage objPCTopUpCards.ErrorDescription
- End If
-
- Function GetProcessCardError(intError)
- Dim s
-
- If intError = 0 Then
- ' No error
- s = ""
- ElseIf intError = 1 Then
- s = GetText("ErrorTUCExpired")
- ElseIf intError = 2 Then
- s = GetText("ErrorTUCUsed")
- ElseIf intError = 3 Then
- s = GetText("ErrorTUCInvalid")
- ElseIf intError = 4 Then
- s = GetText("ErrorUnexpectedError")
- End If
-
- GetProcessCardError = s
- End Function
-
-
- Dim strCardNo
- strCardNo = UCase(Trim(Request("txtCardNo")))
-
- If Not gblnIsLoggedIn Then
- WriteErrorMessage GetText("ErrorUserNotLoggedIn") & " " & GetText("AnonAccessDisabled")
- Else
- ' Top up
-
- If strCardNo <> "" and Request("txtSubmitted") <> "" Then
- If objPCTopUpCards.ProcessCard(strCardNo, gstrLoggedInUser) Then
- RedirectWithMessage "default.asp", GetText("TopUpSuccess")
- Else
- WriteErrorMessage GetText("ErrorTUCUnableToProcess") & ". " & GetProcessCardError(objPCTopUpCards.ProcessErrorNo) & " " & GetText("ActionLogged") & ". " & objPCTopUpCards.ErrorDescription
- End If
- End If
-
-
- %>
- <h1><%=GetText("UseTopUpCard")%></h1>
-
- <p>
- <%=GetText("TopUpCardInstr")%>
- </p>
-
- <p>
- <b>
- <%=GetText("TopUpCardInstrNote")%>
- </b>
- </p>
-
- <FORM ACTION="TopUpCard.asp" METHOD="POST">
- <INPUT type="hidden" name="txtSubmitted" value="Y">
- <TABLE class="webAdmin">
- <TR class="evenRow">
- <TH>
- <%=GetText("Username")%>:
- </TH>
- <TD>
- <% =Server.HTMLEncode(gstrLoggedInUser) %>
- </TD>
- </TR>
- <TR class="oddRow">
- <TH>
- <%=GetText("CardNumber")%>:
- </TH>
- <TD>
- <INPUT TYPE="text" name="txtCardNo" size="40" value="<% =Server.HTMLEncode(strCardNo) %>">
- </TD>
- </TR>
- <TR class="evenRow">
- <TD align="right" colspan="2">
- <INPUT TYPE="submit" name="cmdSubmit" value="<%=GetText("UseTopUpCard")%>">
- </TD>
- </TR>
- </TABLE>
- </FORM>
-
- <%
- End If
-
- Set objPCTopUpCards = Nothing
- %>
- </CENTER>
- <!-- #INCLUDE FILE="includes/footer.inc" -->